package com.simple.relaxed.manager.impl;

import com.simple.relaxed.anno.Mark;
import com.simple.relaxed.manager.AbstractManager;

/**
 * 此类管理着Mark注解注入的对象，它会被Inject注解注入时调用
 */
@Mark(methodName = "getInstance")
public class InjectManager extends AbstractManager<String, Object> {

    private static InjectManager injectManager = new InjectManager();

    private InjectManager() {
        super();
    }

    public static InjectManager getInstance() {
        if (injectManager == null) {
            injectManager = new InjectManager();
        }
        return injectManager;
    }

    public void update(String key, Object value) {
        map.replace(key, value);
    }
}
